// Rippling Spiral, by Erlend Robaye, November 2001 (erlend(at)vt4.net)

Stps="rnd( 120 ) + 20",


Aspc=1,

A0="2*PI",	         	// 1 circle circumferance
A1="3*A0",		         // Spiral x times around
A2="1.5",		          // Max radius of spiral
A3="6",             	// This mixes up the perspective distortion
A4="A3 * ( .9 )",   	// This mixes up the total size
A5="PI/2",		         // Flat point of camera
A6=".3",	           	// Rotation speed of spiral around its own centre
A7="-.8",	          	// Minumum Y of 3D spiral
A8="abs(2*A7) - .2",	// Factor to increase highest ID with to get max Y
A9="rnd(.2) + .2",	  // Rotation-wobble speed of 3D-spiral
A10="A5 + .4",       // Camera inclination angle
A11=".8 + rnd(.3)",  // Pen is dark most of the time

// Rotation parameters
B0="A6*t",
B1="cos(B0)",
B2="sin(B0)",

// Perpective
B3="sin( A10 )",
B4="cos( A10 )",

B5="t*A9",
B6="cos(B5)",
B7="sin(B5)",

B8="(t * B7 * .00003) - A5",
B9=" cos(B8)",
B10="sin(B8)",

C0="s * A2 * cos( s * A1 )",		// X
C1="s * A2 * sin( s * A1 )",		// Y


C2="-B1*C1-B2*C0",	// Rotated X
C3=" B1*C0-B2*C1",	// Rotated Y

// Perspective distortion
C4="       C3 * B4",			// Y'=          Y * cos(camera)
C5=" A3  - C3 * B3",			// Z =Distort - Y * sin(camera)

C6="A4 * C2 / C5",			  // SizeMix * X  / Z
C7="A4 * C4 / C5",	    // SizeMix * Y' / Z

// Rotate the spiral around its centre
C8="-B9 * C7 - B10 * C6",
C9=" B9 * C6 - B10 * C7",

X0="C8",							// X displacement in time
               // Y displacement down
Y0="C9 + (sin(t + s * NUM_S_STEPS * .2) * .3*s)",	

Pen="A11",

// Width of particle depends on Z depth
LWdt="11 - ( ( C5 - 5 ) * 9 )",

ConB=0,

Vers=100

